Carbon


FSDeleteFork

Header: Files.h Carbon status: Supported

Deletes a named fork of a file or directory.

OSErr FSDeleteFork (
    const FSRef *ref, 
    UniCharCount forkNameLength, 
    const UniChar *forkName
);
ref

A pointer to the file or directory.

forkNameLength

The length of the fork name in Unicode characters.

forkName

A pointer to the Unicode name of the fork to delete.

function result

A result code. If the named fork does not exist, errFSForkNotFound is returned.

DISCUSSION

Any storage allocated to the fork is released.

If a given fork always exists for a given volume format (such as data and resource forks for HFS and HFS Plus, or data forks for most other volume formats), this is equivalent to setting the logical size of the fork to zero.

AVAILABILITY

Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)